# config file for all standards xpaths

# common fields to all standards
# title , date , keywords, abstract, organization, language, bounds

def getMergedStandards():
    """
    @summary: returns a dictionary containing all listed standards
    """
    all = {}
    all.update(SANS1878)
    all.update(EML)
    all.update(DublinCore)
    all.update(ISO19115)
    all.update(ISO19115p2)
    all.update(ISO19139)
    all.update(SANS1878)
    all.update(COMMON)
    return all

STANDARDS_LOOKUP = {'iso19115': 'ISO19115', 'iso19115p2': 'ISO19115p2' ,
                    'dc': 'DublinCore', 'dublincore' : 'DublinCore',
                   'iso19139': 'ISO19139', 'eml': 'EML',
                   'sans1878': 'SANS1878', 'common': 'COMMON'}


SANS1878 = {
"sans1878_DatasetTitle" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text()",
"sans1878_DatasetReferenceDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime/text()",
"sans1878_DatasetResponsibleParty" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()",
"sans1878_DatasetResponsiblePartyOrganization" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()",
"sans1878_DatasetResponsiblePartyPosition" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()"       ,  
"sans1878_DatasetLanguage" : "//gmd:language/gco:CharacterString/text()" ,
"sans1878_DatasetCharacterSet" : "//gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"sans1878_DatasetTopicCategory" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode/text()",
"sans1878_DatasetScale" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer/text()" ,
"sans1878_DatasetAbstract" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString/text()" ,
"sans1878_DatasetFormatName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:name/gco:CharacterString/text()" ,
"sans1878_DatasetFormatVersion" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()" ,
        
"sans1878_SpatialWest" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" ,
"sans1878_SpatialSouth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" ,
"sans1878_SpatialEast" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" ,
"sans1878_SpatialNorth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" ,
"sans1878_SpatialBeginDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition/text()" ,
"sans1878_SpatialEndDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition/text()" ,
"sans1878_SpatialVerticalExtentMinimum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real/text()" ,
"sans1878_SpatialMaximum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real/text()" ,
"sans1878_SpatialVerticalExtentUnits" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalCS/gml:VerticalCS/gml:axis/gml:CoordinateSystemAxis/@gml:uom", 
"sans1878_SpatialVerticalExtentDatum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalDatum/gml:VerticalDatum/gml:identifier/text()" ,
"sans1878_SpatialRepresentation" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode/@codeListValue" ,
"sans1878_SpatialReferenceSystem" : "//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem /gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString/text()" ,
"sans1878_SpatialLinageStatement" : "//gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString/text()" ,
"sans1878_SpatialOnlineResourceURL" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()" ,
"sans1878_SpatialOnlineResourceProtocol" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString/text()" ,
"sans1878_SpatialOnlineResourceName" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:name/gco:CharacterString/text()" ,
"sans1878_SpatialOnlineResourceDescription" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:description/gco:CharacterString/text()",
        
"sans1878_MetadataFileIdentifier" : "//gmd:fileIdentifier/gco:CharacterString/text()" ,
"sans1878_MetadataStandardName" : "//gmd:metadataStandardName/gco:CharacterString/text()" ,
"sans1878_MetadataStandardVersion" : "//gmd:metadataStandardVersion/gco:CharacterString/text()" ,
"sans1878_MetadataLanguage" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:language/gco:CharacterString/text()" ,
"sans1878_MetadataCharacterSet" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"sans1878_MetadataTimeStamp" : "//gmd:dateStamp/gco:DateTime/text()" ,
"sans1878_MetadataPointOfContactIndividualName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()" ,
"sans1878_MetadataPointOfContactOrganizationName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()" ,
"sans1878_MetadataPointOfContactPositionName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()" ,
"sans1878_MetadataPointOfContactRole" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue"
}

ISO19139 = {
"iso19139_DatasetTitle" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text()",
"iso19139_DatasetReferenceDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime/text()",
"iso19139_DatasetResponsibleParty" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()",
"iso19139_DatasetResponsiblePartyOrganization" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()",
"iso19139_DatasetResponsiblePartyPosition" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()"       ,  
"iso19139_DatasetLanguage" : "//gmd:language/gco:CharacterString/text()" ,
"iso19139_DatasetCharacterSet" : "//gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19139_DatasetTopicCategory" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode/text()",
"iso19139_DatasetScale" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer/text()" ,
"iso19139_DatasetAbstract" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString/text()" ,
"iso19139_DatasetFormatName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:name/gco:CharacterString/text()" ,
"iso19139_DatasetFormatVersion" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()" ,
        
"iso19139_SpatialWest" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" ,
"iso19139_SpatialSouth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" ,
"iso19139_SpatialEast" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" ,
"iso19139_SpatialNorth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" ,
"iso19139_SpatialBeginDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition/text()" ,
"iso19139_SpatialEndDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition/text()" ,
"iso19139_SpatialVerticalExtentMinimum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real/text()" ,
"iso19139_SpatialMaximum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real/text()" ,
"iso19139_SpatialVerticalExtentUnits" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalCS/gml:VerticalCS/gml:axis/gml:CoordinateSystemAxis/@gml:uom", 
"iso19139_SpatialVerticalExtentDatum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalDatum/gml:VerticalDatum/gml:identifier/text()" ,
"iso19139_SpatialRepresentation" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode/@codeListValue" ,
"iso19139_SpatialReferenceSystem" : "//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem /gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString/text()" ,
"iso19139_SpatialLinageStatement" : "//gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString/text()" ,
"iso19139_SpatialOnlineResourceURL" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()" ,
"iso19139_SpatialOnlineResourceProtocol" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString/text()" ,
"iso19139_SpatialOnlineResourceName" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:name/gco:CharacterString/text()" ,
"iso19139_SpatialOnlineResourceDescription" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:description/gco:CharacterString/text()",
        
"iso19139_MetadataFileIdentifier" : "//gmd:fileIdentifier/gco:CharacterString/text()" ,
"iso19139_MetadataStandardName" : "//gmd:metadataStandardName/gco:CharacterString/text()" ,
"iso19139_MetadataStandardVersion" : "//gmd:metadataStandardVersion/gco:CharacterString/text()" ,
"iso19139_MetadataLanguage" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:language/gco:CharacterString/text()" ,
"iso19139_MetadataCharacterSet" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19139_MetadataTimeStamp" : "//gmd:dateStamp/gco:DateTime/text()" ,
"iso19139_MetadataPointOfContactIndividualName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()" ,
"iso19139_MetadataPointOfContactOrganizationName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()" ,
"iso19139_MetadataPointOfContactPositionName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()" ,
"iso19139_MetadataPointOfContactRole" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue"
}


ISO19115 = {
"iso19115_DatasetTitle" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text()",
"iso19115_DatasetReferenceDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime/text()",
"iso19115_DatasetResponsibleParty" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()",
"iso19115_DatasetResponsiblePartyOrganization" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()",
"iso19115_DatasetResponsiblePartyPosition" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()"       ,  
"iso19115_DatasetLanguage" : "//gmd:language/gco:CharacterString/text()" ,
"iso19115_DatasetCharacterSet" : "//gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19115_DatasetTopicCategory" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode/text()",
"iso19115_DatasetScale" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer/text()" ,
"iso19115_DatasetAbstract" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString/text()" ,
"iso19115_DatasetFormatName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:name/gco:CharacterString/text()" ,
"iso19115_DatasetFormatVersion" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()" ,
        
"iso19115_SpatialWest" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" ,
"iso19115_SpatialSouth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" ,
"iso19115_SpatialEast" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" ,
"iso19115_SpatialNorth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" ,
"iso19115_SpatialBeginDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition/text()" ,
"iso19115_SpatialEndDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition/text()" ,
"iso19115_SpatialVerticalExtentMinimum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real/text()" ,
"iso19115_SpatialMaximum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real/text()" ,
"iso19115_SpatialVerticalExtentUnits" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalCS/gml:VerticalCS/gml:axis/gml:CoordinateSystemAxis/@gml:uom", 
"iso19115_SpatialVerticalExtentDatum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalDatum/gml:VerticalDatum/gml:identifier/text()" ,
"iso19115_SpatialRepresentation" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode/@codeListValue" ,
"iso19115_SpatialReferenceSystem" : "//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem /gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString/text()" ,
"iso19115_SpatialLinageStatement" : "//gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString/text()" ,
"iso19115_SpatialOnlineResourceURL" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()" ,
"iso19115_SpatialOnlineResourceProtocol" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString/text()" ,
"iso19115_SpatialOnlineResourceName" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:name/gco:CharacterString/text()" ,
"iso19115_SpatialOnlineResourceDescription" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:description/gco:CharacterString/text()",
        
"iso19115_MetadataFileIdentifier" : "//gmd:fileIdentifier/gco:CharacterString/text()" ,
"iso19115_MetadataStandardName" : "//gmd:metadataStandardName/gco:CharacterString/text()" ,
"iso19115_MetadataStandardVersion" : "//gmd:metadataStandardVersion/gco:CharacterString/text()" ,
"iso19115_MetadataLanguage" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:language/gco:CharacterString/text()" ,
"iso19115_MetadataCharacterSet" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19115_MetadataTimeStamp" : "//gmd:dateStamp/gco:DateTime/text()" ,
"iso19115_MetadataPointOfContactIndividualName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()" ,
"iso19115_MetadataPointOfContactOrganizationName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()" ,
"iso19115_MetadataPointOfContactPositionName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()" ,
"iso19115_MetadataPointOfContactRole" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue"
}

ISO19115p2 = {
"iso19115p2_DatasetTitle" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text()",
"iso19115p2_DatasetReferenceDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime/text()",
"iso19115p2_DatasetResponsibleParty" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()",
"iso19115p2_DatasetResponsiblePartyOrganization" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()",
"iso19115p2_DatasetResponsiblePartyPosition" : "//gmd:contact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()"       ,  
"iso19115p2_DatasetLanguage" : "//gmd:language/gco:CharacterString/text()" ,
"iso19115p2_DatasetCharacterSet" : "//gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19115p2_DatasetTopicCategory" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode/text()",
"iso19115p2_DatasetScale" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer/text()" ,
"iso19115p2_DatasetAbstract" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString/text()" ,
"iso19115p2_DatasetFormatName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:name/gco:CharacterString/text()" ,
"iso19115p2_DatasetFormatVersion" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()" ,
        
"iso19115p2_SpatialWest" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" ,
"iso19115p2_SpatialSouth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" ,
"iso19115p2_SpatialEast" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" ,
"iso19115p2_SpatialNorth" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" ,
"iso19115p2_SpatialBeginDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition/text()" ,
"iso19115p2_SpatialEndDate" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition/text()" ,
"iso19115p2_SpatialVerticalExtentMinimum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:minimumValue/gco:Real/text()" ,
"iso19115p2_SpatialMaximum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:maximumValue/gco:Real/text()" ,
"iso19115p2_SpatialVerticalExtentUnits" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalCS/gml:VerticalCS/gml:axis/gml:CoordinateSystemAxis/@gml:uom", 
"iso19115p2_SpatialVerticalExtentDatum" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:verticalElement/gmd:EX_VerticalExtent/gmd:verticalCRS/gml:VerticalCRS/gml:verticalDatum/gml:VerticalDatum/gml:identifier/text()" ,
"iso19115p2_SpatialRepresentation" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode/@codeListValue" ,
"iso19115p2_SpatialReferenceSystem" : "//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem /gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString/text()" ,
"iso19115p2_SpatialLinageStatement" : "//gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString/text()" ,
"iso19115p2_SpatialOnlineResourceURL" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()" ,
"iso19115p2_SpatialOnlineResourceProtocol" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString/text()" ,
"iso19115p2_SpatialOnlineResourceName" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:name/gco:CharacterString/text()" ,
"iso19115p2_SpatialOnlineResourceDescription" : "//gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:description/gco:CharacterString/text()",
        
"iso19115p2_MetadataFileIdentifier" : "//gmd:fileIdentifier/gco:CharacterString/text()" ,
"iso19115p2_MetadataStandardName" : "//gmd:metadataStandardName/gco:CharacterString/text()" ,
"iso19115p2_MetadataStandardVersion" : "//gmd:metadataStandardVersion/gco:CharacterString/text()" ,
"iso19115p2_MetadataLanguage" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:language/gco:CharacterString/text()" ,
"iso19115p2_MetadataCharacterSet" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue" ,
"iso19115p2_MetadataTimeStamp" : "//gmd:dateStamp/gco:DateTime/text()" ,
"iso19115p2_MetadataPointOfContactIndividualName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()" ,
"iso19115p2_MetadataPointOfContactOrganizationName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()" ,
"iso19115p2_MetadataPointOfContactPositionName" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:positionName/gco:CharacterString/text()" ,
"iso19115p2_MetadataPointOfContactRole" : "//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue"
}



EML = {"eml_Title" : "//dataset[1]/title[1]/text()",
       "eml_DataOwnerSalutation" : "//dataset[1]/creator[1]/individualName[1]/salutation[1]/text()",
       "eml_DataOwnerGivenName" : "//dataset[1]/creator[1]/individualName[1]/givenName[1]/text()",
       "eml_DataOwnerSurname" : "//dataset[1]/creator[1]/individualName[1]/surName[1]/text()",
       "eml_DataOwnerOrganization" : "//eml/dataset[1]/creator[1]/organizationName[1]/text()",
       "eml_Abstract" : "//dataset[1]/abstract[1]/para[1]",
       "eml_Keywords" : "//dataset[1]/keywordSet[1]/keyword[1]/text()",
       "eml_WestBoundingCoordinate" : "//dataset[1]/coverage[1]/geographicCoverage[1]/boundingCoordinates[1]/westBoundingCoordinate[1]/text()",
       "eml_EastBoundingCoordinate" : "//dataset[1]/coverage[1]/geographicCoverage[1]/boundingCoordinates[1]/eastBoundingCoordinate[1]/text()",
       "eml_NorthBoundingCoordinate" : "//dataset[1]/coverage[1]/geographicCoverage[1]/boundingCoordinates[1]/northBoundingCoordinate[1]/text()",
       "eml_SouthBoundingCoordinate" : "//dataset[1]/coverage[1]/geographicCoverage[1]/boundingCoordinates[1]/southBoundingCoordinate[1]/text()",
       "eml_TemporalCoverageBeginDate" : "//dataset[1]/coverage[1]/temporalCoverage[1]/rangeOfDates[1]/beginDate[1]/calendarDate[1]/text()",
       "eml_TemporalCoverageEndDate" : "//dataset[1]/coverage[1]/temporalCoverage[1]/rangeOfDates[1]/endDate[1]/calendarDate[1]/text()",
       "eml_TaxonomicCoverageRankName" : "//dataset[1]/coverage[1]/taxonomicCoverage[1]/taxonomicClassification[1]/taxonRankName[1]/text()",
       "eml_ContactSalutation" : "//dataset[1]/contact[1]/individualName[1]/salutation[1]/text()",
       "eml_ContactGivenName" : "//dataset[1]/contact[1]/individualName[1]/givenName[1]/text()",
       "eml_ContactSurname" : "//dataset[1]/contact[1]/individualName[1]/surName[1]/text()",
       "eml_ContactOrganizationName" : "//dataset[1]/contact[1]/organizationName[1]/text() "              
       }

DublinCore = {"dc_Title" : "//dc:title[1]/text()",
             "dc_Creator" : "//dc:creator/text()",
             "dc_Subject" : "//dc:subject/text()",
             "dc_Description" : "//dc:description/text()",
             "dc_Publisher" : "//dc:publisher/text()",
             "dc_Contributor" : "//dc:contributor/text()",
             "dc_Date" : "//dc:date/text()",
             "dc_Type" : "//dc:type/text()",
             "dc_Format" : "//dc:format/text()",
             "dc_Identifier" : "//dc:identifier/text()",
             "dc_Source" : "//dc:source/text()",
             "dc_Language" : "//dc:language/text()",
             "dc_Relation" : "//dc:relation/text()",
             "dc_Coverage" : "//dc:coverage/text()",
             "dc_Rights" : "//dc:rights/text()",
             "dc_Modified" : "//dc:tmodified/text()"
             }

COMMON = {"common_Title":"",
          "common_Date":"",
          "common_Keywords":"",
          "common_Abstract":"",
          "common_Organization":"",
          "common_Language":"",
          "common_Bounds":"",
          "common_Bounds_North":"",
          "common_Bounds_South":"",
          "common_Bounds_East":"",
          "common_Bounds_West":""    
    }




